﻿#include "gamewidget.h"
#include "ui_gamewidget.h"


GameWidget::GameWidget(QWidget *parent) :   //相对于注册界面，游戏是子界面
    QWidget(parent),
    ui(new Ui::GameWidget)
{
    ui->setupUi(this);
    this->ui->label1->setText("user name:");

    QTimer *timer = new QTimer(this);
    connect(timer,SIGNAL(timeout()),this,SLOT(timerupdate()));
    timer->start(10);
}


void GameWidget::timerupdate()
{

    this->ui->nameLabel->setText(userName);
}

GameWidget::~GameWidget()
{
    delete ui;
}
